#ifndef __LED_H__
#define __LED_H__
#include "gd32f10x.h"

typedef enum
{
    LED_LD1 = 0,
    LED_LD2,
    LED_LD3,
    LED_LD4,
    LED_LD5,
    LED_LD6,
    LED_LD7,
    LED_LD8,
    LED_LB1,
    LED_LB2,
    LED_LB3,
    LED_LB4,
    LED_LB5,
    LED_LB6,
    // LED_LB7,
    // LED_LB8,

    LED_NUM
}LedID;

typedef struct 
{
    LedID    id;
    uint8_t  state;
    uint32_t gpio_periph;
    uint32_t pin;
}LED;

void led_init(void);
void led_set(uint8_t id, uint8_t state);
uint8_t get_led_state(uint8_t id);
void led_toogle(uint8_t id);
#endif
